adding pascal case to status #1213
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
Added a
to_pascal_caseproperty to theWorkflowExecutionStatusenum class that converts enum names to PascalCase format required by Temporal search attributes. The property converts enum names likeTIMED_OUTto"TimedOut"andCONTINUED_AS_NEWto"ContinuedAsNew".Why?
Temporal search attributes expect execution status values in PascalCase format without underscores. Previously, users had to manually convert enum names when filtering workflows by execution status using search attributes. This property eliminates the need for manual conversion and provides a convenient, consistent way to get the correctly formatted string.
Example usage:
Checklist
Closes Add pascalcase to WorkflowExecutionStatus #1212
How was this tested:
Added unit test
test_workflow_execution_status_search_attribute_value()intests/test_client.pythat verifies correct PascalCase conversion for allWorkflowExecutionStatusenum values:RUNNING→"Running"COMPLETED→"Completed"FAILED→"Failed"CANCELED→"Canceled"TERMINATED→"Terminated"TIMED_OUT→"TimedOut"CONTINUED_AS_NEW→"ContinuedAsNew"The test can be run with:
No documentation updates needed. This is a straightforward addition to an existing enum class that follows standard Python property patterns.